<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="cts" value="${pageContext.request.contextPath}"/>
<html xmlns="http://www.w3.org/1999/xhtml">
<!DOCTYPE HTML>
<html>
<head><title>用户列表</title>
	<style type="text/css">
		body {
			background: #F5F5F5;
			text-align: center;
		}
		table {
			text-align: center;
			margin: 0px auto;
		}
	</style>
	<script type="text/javascript">
	function deleteProd(uid){
	if(window.confirm("确定为该用户添加管理员权限吗？")){
	window.location.href = "${cts}userPrivilege.action?id="+uid;
	}
	}
	</script>
</head>
<body>
	<table bordercolor="black" border="1" width="90%" cellspacing="0px" cellpadding="5px" >
		<tr>
			<th>全选<input type="checkbox" > </th>
			<th>用户ID</th>
			<th>用户姓名</th>
			<th>用户密码</th>
			<th>昵称</th>
			<th>邮箱</th>
			<th>角色</th>
			<th nowrap="nowrap">操作</th>
		</tr>
	<c:forEach items="${userList}" var="user" >
			<tr>
				<td><input type="checkbox" > </td>
				<td>${user.id}</td>
				<td>${user.username}</td>
				<td>${user.password}</td>
				<td>${user.nickname}</td>
				<td>${user.email}</td>
				<td>${user.role}</td>
				<td><a href="javascript:void(0)" onclick="deleteProd('${user.id}')">管理员-权限</a>
				</td>
			</tr>
	</c:forEach>
	</table>
</body>
</html>
